home *** CD-ROM | disk | FTP | other *** search
/ Apple Reference & Presen… 1994 February Supplement / ARPL-Feb-94-Supplement-PowerPC.iso / 3rd Party PowerPC Demo Apps / Aldus FreeHand / Aldus FreeHand 4.0 TV / Aldus FreeHand 4.0 TV.rsrc / Post_1147 < prev    next >
Encoding:
Text File  |  1994-01-25  |  2.2 KB  |  130 lines

  1. userdict begin /texturedict 50 dict def end
  2. texturedict begin
  3. /scalefactor .24 def
  4. /angarray [0 90 180 270] def
  5. /imagesize 72 def
  6. /scaledsize
  7.  {
  8.  imagesize scalefactor mul 
  9.  } def
  10. /angget
  11.  {
  12.  angarray aryindex get 
  13.  } def
  14. /xtransget
  15.  {
  16.  xtrans aryindex get 
  17.  } def
  18. /ytransget
  19.  {
  20.  ytrans aryindex get 
  21.  } def
  22.  
  23. /imageloop 
  24.  {
  25.  0 scaledsize dy  
  26. {
  27. /ycur exch def 
  28. 0 scaledsize dx 
  29. {
  30. /xcur exch def
  31. gsave
  32. xcur ycur translate 
  33. /aryindex rand2 def 
  34. angget rotate
  35. xtransget ytransget translate 
  36. imagesize imagesize scale 
  37. 0 0 moveto
  38. (a) show
  39. grestore
  40. } for
  41. } for 
  42.  } def
  43. end
  44. /invbuf{
  45.  0 1 
  46.  2 index length 1 sub
  47.  {
  48. dup 
  49. 2 index exch 
  50. get 
  51. 255 xor 
  52. 2 index 
  53. 3 1 roll put 
  54.  }
  55.  for
  56. }bdf
  57. /settexturepattern
  58.  {
  59.  texturedict fhtexturepattern get
  60.  invflag
  61. {
  62. dup length /str2 exch string def str2 copy invbuf
  63. } if
  64.  /fhtexturepattern xdf
  65.  } bdf
  66. /texture { 
  67.  
  68.  gsave
  69.  [0 0 0 0] vc
  70.  filler 
  71.  grestore
  72.  supdict begin  
  73.  /txsave save def
  74.  newinside
  75.  vc  
  76.  texturedict begin
  77.  /fhtexturepattern xdf  
  78.  /invflag false def
  79.  fhtexturepattern (burlap) eq  
  80. {/imagesize 144 def}{/imagesize 72 def} ifelse
  81.  fhtexturepattern (light-mezzo) eq {/invflag true def} if
  82.  fhtexturepattern (light-mezzo) eq fhtexturepattern (heavy-mezzo) eq or 
  83. {/fhtexturepattern (mezzo) def} if
  84.  
  85.  9 dict begin
  86.  /FontType 3 def
  87.  /FontMatrix [1 imagesize div 0 0 1 imagesize div 0 0] def
  88.  /FontBBox [0 0 imagesize imagesize] def
  89.  /PaintType 3 def
  90.  /Encoding 256 array def
  91.  0 1 255 {Encoding exch /.notdef put} bind for
  92.  Encoding 97 /thetile put
  93.  /CharProcs 2 dict def
  94.  CharProcs begin
  95.  /.notdef {} def
  96.  /thetile {
  97. imagesize imagesize true 
  98. [imagesize 0 0 imagesize 0 0] 
  99. {fhtexturepattern} systemdict begin imagemask end
  100.  } def
  101.  end
  102.  /BuildChar {
  103. imagesize 0
  104. 0 0 imagesize imagesize
  105. setcachedevice
  106. exch begin
  107. Encoding exch get
  108. CharProcs exch get
  109. end
  110. exec
  111.  } bdf
  112.  currentdict
  113.  end
  114.  /TextureFont exch definefont pop
  115.  /xtrans [0 0 scaledsize neg scaledsize neg] def  
  116.  /ytrans [0 scaledsize neg scaledsize neg 0] def 
  117.  /TextureFont findfont scaledsize scalefont setfont
  118.  fhtexturepattern (burlap) eq fhtexturepattern (denim) eq or
  119.  {
  120. fhtexturepattern (burlap) eq 
  121. {settexturepattern burlapimageloop} 
  122. {settexturepattern denimimageloop} 
  123. ifelse
  124.  }
  125.  {settexturepattern imageloop} ifelse 
  126.  txsave restore
  127.  end 
  128.  end 
  129. } def